package com.shenmazong.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.shenmazong.pojo.TbStory;
import com.shenmazong.service.TbStoryService;
import com.shenmazong.mapper.TbStoryMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.elasticsearch.core.ElasticsearchRestTemplate;
import org.springframework.stereotype.Service;

/**
 *
 */
@Service
public class TbStoryServiceImpl implements TbStoryService{

    @Autowired
    ElasticsearchRestTemplate elasticsearchRestTemplate;

    @Autowired
    TbStoryMapper tbStoryMapper;

    private void test() {
        // 添加
        //tbStoryMapper.insert()
        //tbStoryMapper.selectById()
        //elasticsearchRestTemplate.save()

        // 修改
//        tbStoryMapper.updateById();
//        tbStoryMapper.selectById();
//        elasticsearchRestTemplate.save()

        // 删除
//        tbStoryMapper.deleteById();
//        elasticsearchRestTemplate.delete(id, TbStory.class);
    }
}




